<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="江阳小道">
    <meta name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=0.5, user-scalable=no">
    <title>深呼吸体验之旅摄影作品大赛</title>
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">

    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="__PUBLIC__/css/reset.css">
    <link rel="stylesheet" href="__PUBLIC__/css/base.css">
    <link rel="stylesheet" href="__PUBLIC__/css/main.css">

</head>
<body>
<audio class="tips" src="__PUBLIC__/message.mp3" preload="auto" hidden="hidden"></audio>
<div class="notice-page">
    <div class="content">
        <!--<img class="notice-top" src="__PUBLIC__/img/notice-top.png" alt="">-->

        <div class="clock">
            <!--<div id="Date">Monday 14 January 2013</div>-->

            <ul>
                <li id="hours">{$now_time}</li>
                <!--<li id="point">:</li>-->
                <!--<li id="min">13</li>-->

            </ul>
            <div id="Date">{$now_date} {$now_week}</div>

        </div>


        <img class="notice hidden" src="__PUBLIC__/img/notice1.png" alt="">
        <img class="notice hidden" src="__PUBLIC__/img/notice2.png" alt="">
        <img class="notice hidden" src="__PUBLIC__/img/notice3.png" alt="">
        <!--<img class="notice hidden" src="__PUBLIC__/img/notice4.png" alt="">-->
        <img class="slide-unlock" src="__PUBLIC__/img/slide-unlock.png" alt="">
    </div>
</div>
<script src="__PUBLIC__/js/lib/zepto.min.js"></script>
<script src="__PUBLIC__/js/main.js"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        var notices = $(".notice");
        for( var i = 0 ; i < notices.length; i++ ){
            (function(i){
                setTimeout(function(){
                    notices.eq(i).removeClass('hidden');
                    $('.tips')[0].currentTime = 0;
                    $('.tips')[0].play();
                },(i+1)*1000);
           })(i);
        }
        var isTouchmove = false,
            startX = 0,
            pStartX = 0,
            pageSwipe = $('.notice-page .content').get(0);
        pageSwipe.addEventListener('touchstart',function(event){
            event.preventDefault();
            var touch = event.targetTouches[0];
            startX = touch.pageX;
        },false);
        pageSwipe.addEventListener('touchmove',function(event){
            event.preventDefault();
            var touch = event.targetTouches[0];
            pStartX += touch.pageX - startX;
            startX = touch.pageX;
            $(this).css('left',pStartX);
            if( parseInt($(this).css('left')) > 0 ){
                isTouchmove = true;
            }else{
                isTouchmove = false;
            }
        },false);
        pageSwipe.addEventListener('touchend',function(){
            if( isTouchmove ){
                window.location.href="{:U('Home/index/index')}";
            }
            $(this).css('left',0);
            pStartX = 0;
            startX = 0;
            isTouchmove = false;
        },false);
    });


</script>
<script>
$(document).ready(function() {
//初始化分享
        fenxiang("深呼吸体验之旅摄影作品大赛");
        function fenxiang(title,desc){
            //微信分享
            wx.config({
                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
                appId: "{:C('APPID')}", // 必填，公众号的唯一标识
                timestamp: "{$wxKey['timestamp']}", // 必填，生成签名的时间戳
                nonceStr: "{$wxKey['noncestr']}", // 必填，生成签名的随机串
                signature: "{$wxKey['signature']}",// 必填，签名，见附录1
                jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
            });
            wx.ready(function () {
                var shareData = {
                    title: title,
                    desc: "有体验游，有奖品，有创业项目，只因他们是深呼吸粉丝！",
                    link: "http://tp.nidjia.com{:U('Home/Index/notice')}",
                    imgUrl: "{:C('APP_URL')}/Public/img/logo.jpg"
                };
                wx.onMenuShareAppMessage(shareData);
                wx.onMenuShareTimeline(shareData);
            });
            wx.error(function(res){
                alert(res.errMsg);
            });
        }
});

</script>

<!--<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.js"></script>-->

</body>
</html>
